﻿@using CoralNode.Core.Entity.Domains.Node
@using CoralNode.Core.Entity.Enums
@using CoralNode.MvcClient.Helper
@using Coralcode.Base.Utils
@{
    ViewBag.Title = "Index";
}
@model IList<Coralcode.Adapter.Quiz.Entity.Domain.QuizDomain>
@Html.IncludePage("CoralAdmin/node", "_Left")
<div id="pbody">
    <div class="extra">
        @{
            var node = ViewBag.Node ?? new NodeDomain();
        }
        <div class="pbody_top">
            <span class="ico ico_setting_setting"></span><span class="t t_c">内容管理&nbsp;&nbsp;/&nbsp;&nbsp;@(node.Title) 题库管理</span>
        </div>
        <div id="main">
            <div class="">
                <div class="tablelist_style1" data-js="tabellist_style1">
                    <div class="funsearch p_1 pl_2 pr_2 extra_normal">
                        <a class="btn_5 f_l" target="_blank" href="/m/quiz/listAnswer?nodeId=@node.Id">
                            答案管理</a>
                        <a class="btn_5 f_r ml_3" href="/m/quiz/createQuiz?nodeId=@node.Id&type=@Request.QueryString["type"]">
                            添加题库</a>
                        <div class="f_r">
                            <form method="POST" action="/m/quiz/listQuiz">
                                <label class="search f_l">
                                    <input type="text" name="Title"/>
                                    @Html.AntiForgeryToken()
                                    <input type="submit" value="" class="submit" />
                                </label>
                            </form>
                        </div>
                    </div>
                    <table cellpadding="0" cellspacing="0">
                        <tr class="exclude">
                            <th width="60">选择</th>
                            <th align="left" width="50">ID</th>
                            <th align="left">标题</th>
                            <th>创建时间</th>
                            <th>排序</th>
                            <th align="center" width="240">操作</th>
                        </tr>
                        @foreach (var item in Model) {
                            <tr data-depth="1">
                                <td>
                                    <label class="checkbox_own">
                                        <input type="checkbox" value="@item.Id"/></label></td>
                                <td class="td_left">@item.Id</td>
                                <td class="td_left"><a href="/m/quiz/editQuiz/@item.Id?nodeId=@item.NodeId&type=@Request.QueryString["type"]">@item.Title</a></td>
                                <td>@item.CreateTime.ToString("yyyy-MM-dd HH:mm")</td>
                                <td><a href="/m/quiz/ChangeRank/@item.Id" class="ico ico_moveup mr_2 f_no  btn"></a><a href="/m/quiz/ChangeRank/@item.Id" class="ico ico_movedown btn"></a>
                                <td>
                                    <div class="fun">
                                        <a href="/m/quiz/editQuiz/@item.Id?nodeId=@item.NodeId&type=@Request.QueryString["type"]">修改</a><a href="/m/quiz/deleteQuiz/@item.Id" class="js_delete">删除</a>
                                    </div>
                                </td>
                            </tr>
                        }
                    </table>
                </div>

            </div>
        </div>
        
    </div>
</div>
